package com.xuecheng.auth.controller;

import com.xuecheng.ucenter.model.dto.AuthParamsDto;
import com.xuecheng.ucenter.model.dto.FindPasswordDto;
import com.xuecheng.ucenter.service.FindPasswordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "找回密码接口",tags = "找回密码接口")
@RestController
@RequiredArgsConstructor
@Slf4j
public class FindPasswordController {

    @Autowired(required = false)
    FindPasswordService findPasswordService;


    @ApiOperation("重置密码")
    @PostMapping("/findpassword")
    public  void findPassword(@RequestBody FindPasswordDto findPasswordDto)  {
        log.info("重置密码：{}",findPasswordDto);
        findPasswordService.findPassword(findPasswordDto);
    }
}
